<!-- 卡片包装框样式 -->
<template>
    <div class="card-wrapper">
        <div class="content">
            <div class="title" v-show="title!=''"><i class="fa fa-asterisk fa-2x" v-show="tag"></i>{{ title }}</div>
            <slot name="slot-1"></slot>
        </div>
    </div>
</template>
<script>
/**
 * title: 标题
 * tag: 是否显示红色标记
 */
export default {
    name: "CardWrapper",
    props: {
        title: {
            type: String,
            default: "",
        },
        tag: {
            type: Boolean,
            default: false,
        }
    },
    data() {
        return {
            user: [
                { name: "Jack", sex: "boy" },
                { name: "Jone", sex: "girl" },
                { name: "Tom", sex: "boy" },
            ],
        };
    },
    methods: {

    }
};
</script>
<style lang="less">
.card-wrapper {
    position: relative;
    padding: 10px;
    .content {
        width: 100%;
        height: auto;
        min-height: 50px;
        border: 1px solid rgba(173, 173, 173, 0.5);
        padding: 15px;
        .title {
            position: absolute;
            background: #fff;
            padding: 3px 8px;
            left: 20px;
            top: -4px;
            font-size: 14px;
            font-weight: 700;
            i {
                display: inline-block;
                font-size: 12px;
                color: red;
                margin-right: 5px;
            }
        }
    }
    label:not(.form-check-label):not(.custom-file-label) {
        font-weight: 500;
    }
}
</style>